#ifndef Semaphore_h
#define Semaphore_h

#include "Mutex.h"
#include "Cond.h"
#include <pthread.h>

class Semaphore {

public:
	Semaphore(int valor);
	~Semaphore();
	void wait();
	void signal();

private:
	int valor, despertadas;
	Cond* cond;
	Mutex* mutex;
};

#endif
